package com.cube.reactive.guide.reactive;

/**
 * @author litb
 * @since 2024/6/13 19:22
 */
public class DoFinally {

    public static void main(String[] args) {
        //Stats stats = new Stats();
        //LongAdder statsCancel = new LongAdder();
        //
        //Flux<String> flux =
        //        Flux.just("foo", "bar")
        //                .doOnSubscribe(s -> stats.startTimer())
        //                .doFinally(type -> {
        //                    stats.stopTimerAndRecordTiming();
        //                    if (type == SignalType.CANCEL)
        //                        statsCancel.increment();
        //                })
        //                .take(1);
    }
}
